const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

function climbStairs(n, m) {
  const dp = new Array(n + 1).fill(0);
  dp[0] = 1;
  // dp[1] 1;

  for (let i = 1; i <= n; i++) {
    for (let j = 1; j <= m; j++) {
      if (i - j >= 0) {
        dp[i] += dp[i - j];
      }
    }
  }
  return dp[n];

}

const n = 3;
const m = 2;

console.log(climbStairs(n, m));

rl.close();